from django.contrib import admin
from django.urls import path,include
from rest_framework.routers import DefaultRouter
from .views import *
from rest_framework_simplejwt.views import TokenObtainPairView
urlpatterns = [
    # 127.0.0.1:8000/user/verification
    path("verification/<str:func>/<uuid:uuid>/",ImageVerifyView.as_view()),
    # TokenObtainPairView ==》 登录的校验  用户和密码的操作===>token
    # path("login/",TokenObtainPairView.as_view())
    path("login/",MyTokenTokenObtainPairView.as_view())
]

router = DefaultRouter()
router.register('users', UserViewSet)
router.register('area', AreaViewSet)
router.register('address', AddressViewSet)
urlpatterns += router.urls

# http://127.0.0.1:8080/api/user/verification/register/5269fb80-2c47-4810-95c8-3611c9667000/
# api/user/verification/register/5269fb80-2c47-4810-95c8-3611c9667000/
# api/ ==  http://127.0.0.1:8000/
# http://127.0.0.1:8000/user/verification/5269fb80-2c47-4810-95c8-3611c9667000/



## http://127.0.0.1:8080/api/user/verification/register/5269fb80-2c47-4810-95c8-3611c9667000/
# http://127.0.0.1:8080/api/user/verification/login/84250c9d-644f-4ce3-af8c-528d73ea71d4/